-
Notifications
You must be signed in to change notification settings - Fork 146
Is in ancestor caching #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can we add it as a separate function? |
Hmm, this will duplicate the functionality, doesn't it? |
It makes reviewing easier, as we don't need to worry about back-compatibility. Otherwise can you provide more context to motivate these changes? Why is this needed? There's no issue associated with it. |
If you traverse the graph and query if an apply depends on other apply and do that frequently, known_(in)dependent cut the query costs The change is backward compatible |
Can you clarify where this was a bottleneck that warrants the extra complexity? |
Adding the fuctionality |
Here is the candidate implementation for the #19 https://github.com/pymc-devs/pytensor/blob/graph-replace/pytensor/graph/basic.py#L1924, I use the updated version of the is_in_ancestor and it helps there, the thing especially needed is multiple inputs for the f_apply arg |
8288f46
to
04f6d1b
Compare
Implemented a refactored version of the util to make the complete split for the graph
Here are a few important guidelines and requirements to check before your PR can be merged:
pre-commit
is installed and set up.Don't worry, your PR doesn't need to be in perfect order to submit it. As development progresses and/or reviewers request changes, you can always rewrite the history of your feature/PR branches.
If your PR is an ongoing effort and you would like to involve us in the process, simply make it a draft PR.